﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace LandWeb.Models
{
    public class TreeModels
    {
        private List<TreeNode> _ChildNodes = new List<TreeNode>();
        /// <summary>
        /// 子节点集合
        /// </summary>
        public List<TreeNode> ChildNodes
        {
            get { return _ChildNodes; }
            set { _ChildNodes = value; }
        }
    }

    /// <summary>
    /// 树节点模型
    /// </summary>
    public class TreeNode
    {
        /// <summary>
        /// ID
        /// </summary>
        //public string ID { get; set; }
        /// <summary>
        /// Text
        /// </summary>
        public string Text { get; set; }
        /// <summary>
        /// TextHtml
        /// </summary>
        public string TextHtml { get; set; }
        /// <summary>
        /// Value
        /// </summary>
        public string Value { get; set; }
        /// <summary>
        /// 父节点ID
        /// </summary>
        //public string ParentID { get; set; }

        private string _Title = "";
        /// <summary>
        /// 提示内容
        /// </summary>        
        public string Title
        {
            get { return _Title; }
            set { _Title = value; }
        }

        /// <summary>
        /// 绑定的对象
        /// </summary>        
        public object Obj { get; set; }

        private List<TreeNode> _ChildNodes = new List<TreeNode>();
        /// <summary>
        /// 子节点集合
        /// </summary>
        public List<TreeNode> ChildNodes
        {
            get { return _ChildNodes; }
            set { _ChildNodes = value; }
        }

        private bool _Expanded = true;
        /// <summary>
        /// 是否展开
        /// </summary>
        public bool Expanded
        {
            get { return _Expanded; }
            set { _Expanded = value; }
        }
        /// <summary>
        /// 图片的地址
        /// </summary>
        public string ImageUrl { get; set; }
        /// <summary>
        /// 是否显示CheckBox
        /// </summary>
        public bool ShowCheckBox { get; set; }

        public string ClientFunName { get; set; }
                
        public bool Checked { get; set; }
    }
}